Skip to content

[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119)#14380

Merged
miss-islington merged 1 commit into
python:3.8from
maxking:backport-0225701-3.8
Jun 25, 2019
Merged

[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119)#14380
miss-islington merged 1 commit into
python:3.8from
maxking:backport-0225701-3.8

Conversation

@maxking

@maxking maxking commented Jun 25, 2019

Copy link
Copy Markdown
Contributor

When certain malformed messages have content-type set to 'mulitpart/*' but
still have a single part body, iter_attachments can raise AttributeError. This
patch fixes it by returning a None value instead when the body is single part.
(cherry picked from commit 0225701)

Co-authored-by: Abhilash Raj maxking@users.noreply.github.com

https://bugs.python.org/issue33972

…rror. (pythonGH-14119)

* bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError.

When certain malformed messages have content-type set to 'mulitpart/*' but
still have a single part body, iter_attachments can raise AttributeError. This
patch fixes it by returning a None value instead when the body is single part.
(cherry picked from commit 0225701)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
@maxking maxking requested a review from a team as a code owner June 25, 2019 18:21
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Jun 25, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

@maxking: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit c6e3282 into python:3.8 Jun 25, 2019
@darraghenright

darraghenright commented Sep 11, 2020

Copy link
Copy Markdown

Hi there 👋 What version of 3.8 did this get merged into? Can't seem to see that. Thanks!

Edit — wait, I think it's 3.8.0 beta 2. Interesting, I'm running 3.8.2 and I think I came across this. Will investigate to make sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants